<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

    <?php if ($form->error($model, 'login') || $form->error($model, 'password') || $form->error($model, 'password_repeat')): ?>
        <div class="row alert alert-danger">
            <?php echo $form->error($model,'login'); ?>
            <?php echo $form->error($model,'password'); ?>
            <?php echo $form->error($model,'password_repeat'); ?>
        </div>
    <?php endif; ?>
    <div class="block">
        <div class="row">
            <?php echo $form->labelEx($model,'Логин'); ?>
        </div>
        <div class="row">
            <?php echo $form->textField($model,'login',array('class'=>'form-control', 'size'=>60,'maxlength'=>256)); ?>
        </div>
	</div>

	<div class="block">
        <div class="row">
		<?php echo $form->labelEx($model,'Пароль'); ?>
        </div>
        <div class="row">
		<?php echo $form->passwordField($model,'password',array('class'=>'form-control', 'size'=>60,'maxlength'=>256)); ?>
        </div>
	</div>

    <div class="block">
        <div class="row">
        <?php echo $form->labelEx($model,'Повтор пароля'); ?>
        </div>
        <div class="row">
        <?php echo $form->passwordField($model,'password_repeat',array('class'=>'form-control', 'size'=>60,'maxlength'=>256)); ?>
        </div>
    </div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить', array('class'=>'btn btn-info')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->